package com.hjf.object;

public class Student {
    String name;
    double chinese;
    double english;

    // 构造器
    public Student() {  // 无参构造器

    }

    public Student(String name, double score) { // 有参构造器

    }

    public void printTotalScore() {
        System.out.println(name + "的总成绩：" + (chinese + english));
    }

    public void printAverageScore() {
        System.out.println(name + "平均成绩：" + (chinese + english) / 2.0);
    }

    public void printThis(){
        System.out.println(this);
    }

    public void printPass(int chinese) {
        if(this.chinese > chinese){
            System.out.println("NICE！");
        }
    }
}
